﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WarehouseWebAPP.Pages.admin.Edit_Entities
{
    public partial class EditParameters : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ErrorLabel.Visible = false;
        }

        protected void DetailsView1_ItemDeleting(object sender, DetailsViewDeleteEventArgs e)
        {
            Label ParameterName = (Label)DetailsView1.FindControl("Label1");
            
            String parameter_name = ParameterName.Text;
            if (parameter_name == "version" || parameter_name == "mail_address" || parameter_name == "smtp_server" || parameter_name == "mail_password")
                ErrorLabel.Visible = true;
            e.Cancel = true;

        }
    }
}
